package com.cipe.cmrs.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * <p>
 * Pojo mapping TABLE dbo.Region
 * </p>
 * 
 * <p>
 * Generated at Sat Dec 03 14:39:49 PKT 2011
 * </p>
 * 
 * @author Incepio
 * 
 */
@Entity
@Table(name = "Region")
@SuppressWarnings("serial")
public class Region extends BaseAuditEntity {

	/**
	 * List of Cipeproject
	 */
	@OneToMany(mappedBy = "region")
	private List<Cipeproject>	cipeprojects	= null;
	/**
	 * List of Country
	 */
	@OneToMany(mappedBy = "region")
	private List<Country>		countries		= null;
	/**
	 * Attribute displayName.
	 */
	@Basic
	@Column(name = "regionname", length = 100)
	private String				displayName;
	/**
	 * List of User
	 */
	@OneToMany(mappedBy = "region")
	private List<User>			users			= null;

    @OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="regionaldirector")
	private User regionalDirector = null;
	
	/**
	 * Get the list of Cipeproject
	 */
	public List<Cipeproject> getCipeprojects() {
		return this.cipeprojects;
	}

	/**
	 * @return the countries
	 */
	public List<Country> getCountries() {
		return countries;
	}

	/**
	 * @return displayName
	 */
	public String getDisplayName() {
		return displayName;
	}

	/**
	 * @return the users
	 */
	public List<User> getUsers() {
		return users;
	}

	/**
	 * Set the list of Cipeproject
	 */
	public void setCipeprojects(List<Cipeproject> cipeprojects) {
		this.cipeprojects = cipeprojects;
	}

	/**
	 * @param countries the countries to set
	 */
	public void setCountries(List<Country> countries) {
		this.countries = countries;
	}

	/**
	 * @param displayName
	 *            new value for displayName
	 */
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	/**
	 * @param users the users to set
	 */
	public void setUsers(List<User> users) {
		this.users = users;
	}

	/**
	 * @return the regionalDirector
	 */
	public User getRegionalDirector() {
		return regionalDirector;
	}

	/**
	 * @param regionalDirector the regionalDirector to set
	 */
	public void setRegionalDirector(User regionalDirector) {
		this.regionalDirector = regionalDirector;
	}
	
}